﻿
namespace NetROS.Tiers.Windows.Forms
{
	/// <summary>
	/// abstract PutniNalogStavkaDnevnica typed datagridview
	/// </summary>
	[System.ComponentModel.DesignerCategoryAttribute("code")]
	public abstract class PutniNalogStavkaDnevnicaDataGridViewBase : System.Windows.Forms.UserControl
	{	
		/// <summary> 
		/// Thrown when the current Entity changed.
		/// </summary>
		public event System.EventHandler<PutniNalogStavkaDnevnicaDataGridViewEventArgs> CurrentEntityChanged;
		
		#region Fields
				
		/// <summary> 
		/// the current entity.
		/// </summary>
		private Entities.PutniNalogStavkaDnevnica _currentPutniNalogStavkaDnevnica = null;
		//private Dictionary<string, string> _columnsHeaders = new Dictionary<string, string>();
		
		/// <summary> 
		/// the datagridview instance
		/// </summary>
		protected System.Windows.Forms.DataGridView uxPutniNalogStavkaDnevnicaDataGridView;
		
		/// <summary> 
		/// the errorprovider
		/// </summary>
		protected System.Windows.Forms.ErrorProvider uxPutniNalogStavkaDnevnicaErrorProvider;
		
		/// <summary> 
		/// the bindingsource
		/// </summary>
		protected System.Windows.Forms.BindingSource uxPutniNalogStavkaDnevnicaBindingSource;
		
		
		/// <summary> 
		/// the DGV column associated with the ID property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxIDDataGridViewColumn;
		/// <summary> 
		/// the DGV column associated with the IDPutniNalog property
		/// </summary>
		protected System.Windows.Forms.DataGridViewComboBoxColumn uxIDPutniNalogDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the Pocetak property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxPocetakDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the Kraj property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxKrajDataGridViewColumn;
		/// <summary> 
		/// the DGV column associated with the IDDnevnica property
		/// </summary>
		protected System.Windows.Forms.DataGridViewComboBoxColumn uxIDDnevnicaDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the DnevnicaIznos property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxDnevnicaIznosDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the OdobreniPostotakDnevnice property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxOdobreniPostotakDnevniceDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the Iznos property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxIznosDataGridViewColumn;
		/// <summary> 
		/// the DGV column associated with the IDKontoDnevnice property
		/// </summary>
		protected System.Windows.Forms.DataGridViewComboBoxColumn uxIDKontoDnevniceDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the IDBlagajnaStavka property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxIDBlagajnaStavkaDataGridViewColumn;
		
		#endregion
					
		#region Combo list
		
				
		private Entities.TList<Entities.Dnevnica> _IDDnevnicaList;
		
		/// <summary> 
		/// The list of selectable Dnevnica
		/// </summary>
		[System.ComponentModel.Category("DropDownList BindingSources")]
		public Entities.TList<Entities.Dnevnica> IDDnevnicaList
		{
			get {return this._IDDnevnicaList;}
			set 
			{
				this._IDDnevnicaList = value;
				this.uxIDDnevnicaDataGridViewColumn.DataSource = null;
				this.uxIDDnevnicaDataGridViewColumn.DataSource = this._IDDnevnicaList;
			}
		}
		
		private bool _allowNewItemInIDDnevnicaList;
		
		/// <summary> 
		/// Indicates if user can add an item in the list of Dnevnica
		/// </summary>
		[System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Indicates if end user can add a new item in the combobox. an event will be thrown then.")]
		public bool AllowNewItemInIDDnevnicaList
		{
			get { return _allowNewItemInIDDnevnicaList;}
			set
			{
				this._allowNewItemInIDDnevnicaList = value;
				this.uxIDDnevnicaDataGridViewColumn.DisplayStyle = value ? System.Windows.Forms.DataGridViewComboBoxDisplayStyle.ComboBox : System.Windows.Forms.DataGridViewComboBoxDisplayStyle.DropDownButton;
			}
		}
		
				
		private Entities.TList<Entities.Konto> _IDKontoDnevniceList;
		
		/// <summary> 
		/// The list of selectable Konto
		/// </summary>
		[System.ComponentModel.Category("DropDownList BindingSources")]
		public Entities.TList<Entities.Konto> IDKontoDnevniceList
		{
			get {return this._IDKontoDnevniceList;}
			set 
			{
				this._IDKontoDnevniceList = value;
				this.uxIDKontoDnevniceDataGridViewColumn.DataSource = null;
				this.uxIDKontoDnevniceDataGridViewColumn.DataSource = this._IDKontoDnevniceList;
			}
		}
		
		private bool _allowNewItemInIDKontoDnevniceList;
		
		/// <summary> 
		/// Indicates if user can add an item in the list of Konto
		/// </summary>
		[System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Indicates if end user can add a new item in the combobox. an event will be thrown then.")]
		public bool AllowNewItemInIDKontoDnevniceList
		{
			get { return _allowNewItemInIDKontoDnevniceList;}
			set
			{
				this._allowNewItemInIDKontoDnevniceList = value;
				this.uxIDKontoDnevniceDataGridViewColumn.DisplayStyle = value ? System.Windows.Forms.DataGridViewComboBoxDisplayStyle.ComboBox : System.Windows.Forms.DataGridViewComboBoxDisplayStyle.DropDownButton;
			}
		}
		
				
		private Entities.TList<Entities.PutniNalog> _IDPutniNalogList;
		
		/// <summary> 
		/// The list of selectable PutniNalog
		/// </summary>
		[System.ComponentModel.Category("DropDownList BindingSources")]
		public Entities.TList<Entities.PutniNalog> IDPutniNalogList
		{
			get {return this._IDPutniNalogList;}
			set 
			{
				this._IDPutniNalogList = value;
				this.uxIDPutniNalogDataGridViewColumn.DataSource = null;
				this.uxIDPutniNalogDataGridViewColumn.DataSource = this._IDPutniNalogList;
			}
		}
		
		private bool _allowNewItemInIDPutniNalogList;
		
		/// <summary> 
		/// Indicates if user can add an item in the list of PutniNalog
		/// </summary>
		[System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Indicates if end user can add a new item in the combobox. an event will be thrown then.")]
		public bool AllowNewItemInIDPutniNalogList
		{
			get { return _allowNewItemInIDPutniNalogList;}
			set
			{
				this._allowNewItemInIDPutniNalogList = value;
				this.uxIDPutniNalogDataGridViewColumn.DisplayStyle = value ? System.Windows.Forms.DataGridViewComboBoxDisplayStyle.ComboBox : System.Windows.Forms.DataGridViewComboBoxDisplayStyle.DropDownButton;
			}
		}
		
		#endregion
		
		#region Main Datasource
		
		private Entities.TList<Entities.PutniNalogStavkaDnevnica> _PutniNalogStavkaDnevnicaList;
				
		/// <summary> 
		/// The list of PutniNalogStavkaDnevnica to be displayed in the DGV.
		/// </summary>
		[System.ComponentModel.Category("Data")]
		public Entities.TList<Entities.PutniNalogStavkaDnevnica> PutniNalogStavkaDnevnicaList
		{
			get {return this._PutniNalogStavkaDnevnicaList;}
			set
			{
				this._PutniNalogStavkaDnevnicaList = value;
				this.uxPutniNalogStavkaDnevnicaBindingSource.DataSource = null;
				this.uxPutniNalogStavkaDnevnicaBindingSource.DataSource = value;
				this.uxPutniNalogStavkaDnevnicaDataGridView.DataSource = null;
				this.uxPutniNalogStavkaDnevnicaDataGridView.DataSource = this.uxPutniNalogStavkaDnevnicaBindingSource;				
				//this.uxPutniNalogStavkaDnevnicaBindingSource.ListChanged += new System.ComponentModel.ListChangedEventHandler(uxPutniNalogStavkaDnevnicaBindingSource_ListChanged);
				this.uxPutniNalogStavkaDnevnicaBindingSource.CurrentItemChanged += new System.EventHandler(OnPutniNalogStavkaDnevnicaBindingSourceCurrentItemChanged);
			}
		}
		
		private void OnPutniNalogStavkaDnevnicaBindingSourceCurrentItemChanged(object sender, System.EventArgs e)
		{
			_currentPutniNalogStavkaDnevnica = uxPutniNalogStavkaDnevnicaBindingSource.Current as Entities.PutniNalogStavkaDnevnica;
			
			if (_currentPutniNalogStavkaDnevnica != null)
			{
				_currentPutniNalogStavkaDnevnica.Validate();
			}
			//_PutniNalogStavkaDnevnica.Validate();
			OnCurrentEntityChanged();
		}

		//void uxPutniNalogStavkaDnevnicaBindingSource_ListChanged(object sender, System.ComponentModel.ListChangedEventArgs e)
		//{
			//throw new Exception("The method or operation is not implemented.");
		//}		
		
		#endregion
		
		/// <summary>
		/// Gets the currently selected <c cref="Entities.PutniNalogStavkaDnevnica"/> instance.
		/// </summary>
		public Entities.PutniNalogStavkaDnevnica SelectedPutniNalogStavkaDnevnica
		{
			get {return this._currentPutniNalogStavkaDnevnica;}
		}
		
		#region other properties
		
		/// <summary>
		/// Gets or sets a value indicating whether you have provided your own data-management operations for the DataGridView control.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public bool VirtualMode
		{
			get {return this.uxPutniNalogStavkaDnevnicaDataGridView.VirtualMode;}
			set
			{
				this.uxPutniNalogStavkaDnevnicaDataGridView.VirtualMode = value;
			}
		}
		
		/// <summary>
		/// Gets or sets a value indicating whether the option to add rows is displayed to the user.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public bool AllowUserToAddRows
		{
			get {return this.uxPutniNalogStavkaDnevnicaDataGridView.AllowUserToAddRows;}
			set {this.uxPutniNalogStavkaDnevnicaDataGridView.AllowUserToAddRows = value;}
		}
		
		/// <summary>
		/// Gets or sets a value indicating whether the user is allowed to delete rows from the DataGridView.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public bool AllowUserToDeleteRows
		{
			get {return this.uxPutniNalogStavkaDnevnicaDataGridView.AllowUserToDeleteRows;}
			set {this.uxPutniNalogStavkaDnevnicaDataGridView.AllowUserToDeleteRows = value;}
		}
		
		/// <summary>
		/// Gets the <c cref="DataGridView"/> instance.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public System.Windows.Forms.DataGridView DataGridView
		{
			get {return this.uxPutniNalogStavkaDnevnicaDataGridView;}
		}
		
		/// <summary>
		/// Gets a collection that contains all the columns in the control.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]		
		[System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Visible)]
		//[System.ComponentModel.EditorAttribute("System.Windows.Forms.Design.DataGridViewColumnCollectionEditor, System.Design", typeof(System.Drawing.Design.UITypeEditor))] 
		public System.Windows.Forms.DataGridViewColumnCollection Columns
		{
			get { return this.uxPutniNalogStavkaDnevnicaDataGridView.Columns; }
		}
		
		#endregion
		
		/// <summary> 
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.IContainer components = null;
	
		/// <summary> 
		/// Clean up any resources being used.
		/// </summary>
		/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
		protected override void Dispose(bool disposing)
		{
			if (disposing && (components != null))
			{
				components.Dispose();
			}
			base.Dispose(disposing);
		}
	
		#region Constructor
	
		/// <summary>
		/// Initializes a new instance of the <see cref="PutniNalogStavkaDnevnicaDataGridViewBase"/> class.
		/// </summary>
		public PutniNalogStavkaDnevnicaDataGridViewBase()
		{			
			this.components = new System.ComponentModel.Container();			
			
			this.uxPutniNalogStavkaDnevnicaDataGridView = new System.Windows.Forms.DataGridView();
			this.uxPutniNalogStavkaDnevnicaBindingSource = new System.Windows.Forms.BindingSource(this.components);
			this.uxPutniNalogStavkaDnevnicaErrorProvider = new System.Windows.Forms.ErrorProvider(this.components);
			this.uxIDDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxIDPutniNalogDataGridViewColumn = new System.Windows.Forms.DataGridViewComboBoxColumn();
			this.uxPocetakDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxKrajDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxIDDnevnicaDataGridViewColumn = new System.Windows.Forms.DataGridViewComboBoxColumn();
			this.uxDnevnicaIznosDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxOdobreniPostotakDnevniceDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxIznosDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxIDKontoDnevniceDataGridViewColumn = new System.Windows.Forms.DataGridViewComboBoxColumn();
			this.uxIDBlagajnaStavkaDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			//this.uxIDDnevnicaBindingSource = new DnevnicaBindingSource(this.components);
			//((System.ComponentModel.ISupportInitialize)(this.uxIDDnevnicaBindingSource)).BeginInit();
			//this.uxIDKontoDnevniceBindingSource = new KontoBindingSource(this.components);
			//((System.ComponentModel.ISupportInitialize)(this.uxIDKontoDnevniceBindingSource)).BeginInit();
			//this.uxIDPutniNalogBindingSource = new PutniNalogBindingSource(this.components);
			//((System.ComponentModel.ISupportInitialize)(this.uxIDPutniNalogBindingSource)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.uxPutniNalogStavkaDnevnicaDataGridView)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.uxPutniNalogStavkaDnevnicaBindingSource)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.uxPutniNalogStavkaDnevnicaErrorProvider)).BeginInit();
			this.SuspendLayout();
						
			// 
			// uxPutniNalogStavkaDnevnicaErrorProvider
			// 
			this.uxPutniNalogStavkaDnevnicaErrorProvider.ContainerControl = this;
			this.uxPutniNalogStavkaDnevnicaErrorProvider.DataSource = this.uxPutniNalogStavkaDnevnicaBindingSource;						
			// 
			// uxPutniNalogStavkaDnevnicaDataGridView
			// 
			this.uxPutniNalogStavkaDnevnicaDataGridView.AutoGenerateColumns = false;
			this.uxPutniNalogStavkaDnevnicaDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
			this.uxPutniNalogStavkaDnevnicaDataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
		this.uxIDDataGridViewColumn,
		this.uxIDPutniNalogDataGridViewColumn,
		this.uxPocetakDataGridViewColumn,
		this.uxKrajDataGridViewColumn,
		this.uxIDDnevnicaDataGridViewColumn,
		this.uxDnevnicaIznosDataGridViewColumn,
		this.uxOdobreniPostotakDnevniceDataGridViewColumn,
		this.uxIznosDataGridViewColumn,
		this.uxIDKontoDnevniceDataGridViewColumn,
		this.uxIDBlagajnaStavkaDataGridViewColumn			});
			this.uxPutniNalogStavkaDnevnicaDataGridView.Dock = System.Windows.Forms.DockStyle.Fill;
			this.uxPutniNalogStavkaDnevnicaDataGridView.Location = new System.Drawing.Point(0, 0);
			this.uxPutniNalogStavkaDnevnicaDataGridView.Name = "uxPutniNalogStavkaDnevnicaDataGridView";
			this.uxPutniNalogStavkaDnevnicaDataGridView.Size = new System.Drawing.Size(470, 300);
			this.uxPutniNalogStavkaDnevnicaDataGridView.TabIndex = 0;	
			this.uxPutniNalogStavkaDnevnicaDataGridView.BackgroundColor = System.Drawing.Color.WhiteSmoke;
			this.uxPutniNalogStavkaDnevnicaDataGridView.EnableHeadersVisualStyles = false;
			this.uxPutniNalogStavkaDnevnicaDataGridView.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.OnPutniNalogStavkaDnevnicaDataGridViewDataError);
			this.uxPutniNalogStavkaDnevnicaDataGridView.CellValueNeeded += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.OnPutniNalogStavkaDnevnicaDataGridViewCellValueNeeded);
			this.uxPutniNalogStavkaDnevnicaDataGridView.CellValuePushed += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.OnPutniNalogStavkaDnevnicaDataGridViewCellValuePushed);
			
			//
			// uxIDDataGridViewColumn
			//
			this.uxIDDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxIDDataGridViewColumn.DataPropertyName = "ID";
			this.uxIDDataGridViewColumn.HeaderText = "ID";
			this.uxIDDataGridViewColumn.Name = "uxIDDataGridViewColumn";
			this.uxIDDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxIDDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxIDDataGridViewColumn.ReadOnly = true;		
			//
			// uxIDPutniNalogDataGridViewColumn
			//
			this.uxIDPutniNalogDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxIDPutniNalogDataGridViewColumn.DataPropertyName = "IDPutniNalog";
			this.uxIDPutniNalogDataGridViewColumn.HeaderText = "IDPutniNalog";
			this.uxIDPutniNalogDataGridViewColumn.Name = "uxIDPutniNalogDataGridViewColumn";
			this.uxIDPutniNalogDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxIDPutniNalogDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxIDPutniNalogDataGridViewColumn.ReadOnly = false;		
			//
			// uxPocetakDataGridViewColumn
			//
			this.uxPocetakDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxPocetakDataGridViewColumn.DataPropertyName = "Pocetak";
			this.uxPocetakDataGridViewColumn.HeaderText = "Pocetak";
			this.uxPocetakDataGridViewColumn.Name = "uxPocetakDataGridViewColumn";
			this.uxPocetakDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxPocetakDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxPocetakDataGridViewColumn.ReadOnly = false;		
			//
			// uxKrajDataGridViewColumn
			//
			this.uxKrajDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxKrajDataGridViewColumn.DataPropertyName = "Kraj";
			this.uxKrajDataGridViewColumn.HeaderText = "Kraj";
			this.uxKrajDataGridViewColumn.Name = "uxKrajDataGridViewColumn";
			this.uxKrajDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxKrajDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxKrajDataGridViewColumn.ReadOnly = false;		
			//
			// uxIDDnevnicaDataGridViewColumn
			//
			this.uxIDDnevnicaDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxIDDnevnicaDataGridViewColumn.DataPropertyName = "IDDnevnica";
			this.uxIDDnevnicaDataGridViewColumn.HeaderText = "IDDnevnica";
			this.uxIDDnevnicaDataGridViewColumn.Name = "uxIDDnevnicaDataGridViewColumn";
			this.uxIDDnevnicaDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxIDDnevnicaDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxIDDnevnicaDataGridViewColumn.ReadOnly = false;		
			//
			// uxDnevnicaIznosDataGridViewColumn
			//
			this.uxDnevnicaIznosDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxDnevnicaIznosDataGridViewColumn.DataPropertyName = "DnevnicaIznos";
			this.uxDnevnicaIznosDataGridViewColumn.HeaderText = "DnevnicaIznos";
			this.uxDnevnicaIznosDataGridViewColumn.Name = "uxDnevnicaIznosDataGridViewColumn";
			this.uxDnevnicaIznosDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxDnevnicaIznosDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxDnevnicaIznosDataGridViewColumn.ReadOnly = false;		
			//
			// uxOdobreniPostotakDnevniceDataGridViewColumn
			//
			this.uxOdobreniPostotakDnevniceDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxOdobreniPostotakDnevniceDataGridViewColumn.DataPropertyName = "OdobreniPostotakDnevnice";
			this.uxOdobreniPostotakDnevniceDataGridViewColumn.HeaderText = "OdobreniPostotakDnevnice";
			this.uxOdobreniPostotakDnevniceDataGridViewColumn.Name = "uxOdobreniPostotakDnevniceDataGridViewColumn";
			this.uxOdobreniPostotakDnevniceDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxOdobreniPostotakDnevniceDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxOdobreniPostotakDnevniceDataGridViewColumn.ReadOnly = false;		
			//
			// uxIznosDataGridViewColumn
			//
			this.uxIznosDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxIznosDataGridViewColumn.DataPropertyName = "Iznos";
			this.uxIznosDataGridViewColumn.HeaderText = "Iznos";
			this.uxIznosDataGridViewColumn.Name = "uxIznosDataGridViewColumn";
			this.uxIznosDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxIznosDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxIznosDataGridViewColumn.ReadOnly = false;		
			//
			// uxIDKontoDnevniceDataGridViewColumn
			//
			this.uxIDKontoDnevniceDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxIDKontoDnevniceDataGridViewColumn.DataPropertyName = "IDKontoDnevnice";
			this.uxIDKontoDnevniceDataGridViewColumn.HeaderText = "IDKontoDnevnice";
			this.uxIDKontoDnevniceDataGridViewColumn.Name = "uxIDKontoDnevniceDataGridViewColumn";
			this.uxIDKontoDnevniceDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxIDKontoDnevniceDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxIDKontoDnevniceDataGridViewColumn.ReadOnly = false;		
			//
			// uxIDBlagajnaStavkaDataGridViewColumn
			//
			this.uxIDBlagajnaStavkaDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxIDBlagajnaStavkaDataGridViewColumn.DataPropertyName = "IDBlagajnaStavka";
			this.uxIDBlagajnaStavkaDataGridViewColumn.HeaderText = "IDBlagajnaStavka";
			this.uxIDBlagajnaStavkaDataGridViewColumn.Name = "uxIDBlagajnaStavkaDataGridViewColumn";
			this.uxIDBlagajnaStavkaDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxIDBlagajnaStavkaDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxIDBlagajnaStavkaDataGridViewColumn.ReadOnly = false;		
			//
			// uxIDDnevnicaDataGridViewColumn
			//				
			this.uxIDDnevnicaDataGridViewColumn.DisplayMember = "Naziv";	
			this.uxIDDnevnicaDataGridViewColumn.ValueMember = "ID";	
			this.uxIDDnevnicaDataGridViewColumn.DisplayStyleForCurrentCellOnly = true;
			//uxIDDnevnicaDataGridViewColumn.DataSource = uxIDDnevnicaBindingSource;				
				
			//
			// uxIDKontoDnevniceDataGridViewColumn
			//				
			this.uxIDKontoDnevniceDataGridViewColumn.DisplayMember = "Sifra";	
			this.uxIDKontoDnevniceDataGridViewColumn.ValueMember = "ID";	
			this.uxIDKontoDnevniceDataGridViewColumn.DisplayStyleForCurrentCellOnly = true;
			//uxIDKontoDnevniceDataGridViewColumn.DataSource = uxIDKontoDnevniceBindingSource;				
				
			//
			// uxIDPutniNalogDataGridViewColumn
			//				
			this.uxIDPutniNalogDataGridViewColumn.DisplayMember = "Oznaka";	
			this.uxIDPutniNalogDataGridViewColumn.ValueMember = "ID";	
			this.uxIDPutniNalogDataGridViewColumn.DisplayStyleForCurrentCellOnly = true;
			//uxIDPutniNalogDataGridViewColumn.DataSource = uxIDPutniNalogBindingSource;				
				
			
			// this
			this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
			this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
			this.Controls.Add(this.uxPutniNalogStavkaDnevnicaDataGridView);
			this.Name = "PutniNalogStavkaDnevnicaDataGridView";
			this.Size = new System.Drawing.Size(470, 300);
			//((System.ComponentModel.ISupportInitialize)(this.uxIDDnevnicaBindingSource)).EndInit();
			//((System.ComponentModel.ISupportInitialize)(this.uxIDKontoDnevniceBindingSource)).EndInit();
			//((System.ComponentModel.ISupportInitialize)(this.uxIDPutniNalogBindingSource)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.uxPutniNalogStavkaDnevnicaErrorProvider)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.uxPutniNalogStavkaDnevnicaDataGridView)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.uxPutniNalogStavkaDnevnicaBindingSource)).EndInit();
			this.ResumeLayout(false);
		}
		#endregion
				
		#region events
		
		/// <summary>
		/// Raised the CurrentEntityChanged event.
		/// </summary>
		protected void OnCurrentEntityChanged()
		{
			if (CurrentEntityChanged != null)
			{
				PutniNalogStavkaDnevnicaDataGridViewEventArgs args = new PutniNalogStavkaDnevnicaDataGridViewEventArgs();
				args.PutniNalogStavkaDnevnica = _currentPutniNalogStavkaDnevnica;
				CurrentEntityChanged(this, args); 
			}
		}
		
		#endregion
		
		/// <summary>
		/// Strongly typed event 
		/// </summary>
		public class PutniNalogStavkaDnevnicaDataGridViewEventArgs : System.EventArgs
		{
			private Entities.PutniNalogStavkaDnevnica	_PutniNalogStavkaDnevnica;
	
			/// <summary>
			/// the  Entities.PutniNalogStavkaDnevnica instance.
			/// </summary>
			public Entities.PutniNalogStavkaDnevnica PutniNalogStavkaDnevnica
			{
				get { return _PutniNalogStavkaDnevnica; }
				set { _PutniNalogStavkaDnevnica = value; }
			}	
		}
		
		/// <summary>
		/// Handles the DataError event of the uxPutniNalogStavkaDnevnicaDataGridView control.
		/// </summary>
		/// <param name="sender">The source of the event.</param>
		/// <param name="e">The <see cref="T:System.Windows.Forms.DataGridViewDataErrorEventArgs"/> instance containing the event data.</param>
		protected void OnPutniNalogStavkaDnevnicaDataGridViewDataError(object sender, System.Windows.Forms.DataGridViewDataErrorEventArgs e)
		{
			System.Diagnostics.Debug.WriteLine(string.Format( "{0}, {1}", e.ColumnIndex, e.RowIndex));
		}
		
		/// <summary>
		/// Handles the CellValueNeeded event of the uxPutniNalogStavkaDnevnicaDataGridView control.
		/// </summary>
		/// <param name="sender">The source of the event.</param>
		/// <param name="e">The <see cref="T:System.Windows.Forms.DataGridViewCellValueEventArgs"/> instance containing the event data.</param>
		protected void OnPutniNalogStavkaDnevnicaDataGridViewCellValueNeeded(object sender, System.Windows.Forms.DataGridViewCellValueEventArgs e)
		{
			switch(uxPutniNalogStavkaDnevnicaDataGridView.Columns[e.ColumnIndex].Name)
			{
					case "uxIDDataGridViewColumn":
						e.Value = PutniNalogStavkaDnevnicaList[e.RowIndex].ID;
						break;
					case "uxIDPutniNalogDataGridViewColumn":
						e.Value = PutniNalogStavkaDnevnicaList[e.RowIndex].IDPutniNalog;
						break;
					case "uxPocetakDataGridViewColumn":
						e.Value = PutniNalogStavkaDnevnicaList[e.RowIndex].Pocetak;
						break;
					case "uxKrajDataGridViewColumn":
						e.Value = PutniNalogStavkaDnevnicaList[e.RowIndex].Kraj;
						break;
					case "uxIDDnevnicaDataGridViewColumn":
						e.Value = PutniNalogStavkaDnevnicaList[e.RowIndex].IDDnevnica;
						break;
					case "uxDnevnicaIznosDataGridViewColumn":
						e.Value = PutniNalogStavkaDnevnicaList[e.RowIndex].DnevnicaIznos;
						break;
					case "uxOdobreniPostotakDnevniceDataGridViewColumn":
						e.Value = PutniNalogStavkaDnevnicaList[e.RowIndex].OdobreniPostotakDnevnice;
						break;
					case "uxIznosDataGridViewColumn":
						e.Value = PutniNalogStavkaDnevnicaList[e.RowIndex].Iznos;
						break;
					case "uxIDKontoDnevniceDataGridViewColumn":
						e.Value = PutniNalogStavkaDnevnicaList[e.RowIndex].IDKontoDnevnice;
						break;
					case "uxIDBlagajnaStavkaDataGridViewColumn":
						e.Value = PutniNalogStavkaDnevnicaList[e.RowIndex].IDBlagajnaStavka;
						break;
				default:
				break;
			}
		}
		
		/// <summary>
		/// Handles the CellValuePushed event of the uxPutniNalogStavkaDnevnicaDataGridView control.
		/// </summary>
		/// <param name="sender">The source of the event.</param>
		/// <param name="e">The <see cref="T:System.Windows.Forms.DataGridViewCellValueEventArgs"/> instance containing the event data.</param>
		protected void OnPutniNalogStavkaDnevnicaDataGridViewCellValuePushed(object sender, System.Windows.Forms.DataGridViewCellValueEventArgs e)
		{
			switch(uxPutniNalogStavkaDnevnicaDataGridView.Columns[e.ColumnIndex].Name)
			{
					case "uxIDDataGridViewColumn":
						PutniNalogStavkaDnevnicaList[e.RowIndex].ID = (System.Int32)e.Value;
						break;
					case "uxIDPutniNalogDataGridViewColumn":
						PutniNalogStavkaDnevnicaList[e.RowIndex].IDPutniNalog = (System.Int32)e.Value;
						break;
					case "uxPocetakDataGridViewColumn":
						PutniNalogStavkaDnevnicaList[e.RowIndex].Pocetak = (System.DateTime?)e.Value;
						break;
					case "uxKrajDataGridViewColumn":
						PutniNalogStavkaDnevnicaList[e.RowIndex].Kraj = (System.DateTime?)e.Value;
						break;
					case "uxIDDnevnicaDataGridViewColumn":
						PutniNalogStavkaDnevnicaList[e.RowIndex].IDDnevnica = (System.Int32?)e.Value;
						break;
					case "uxDnevnicaIznosDataGridViewColumn":
						PutniNalogStavkaDnevnicaList[e.RowIndex].DnevnicaIznos = (System.Decimal?)e.Value;
						break;
					case "uxOdobreniPostotakDnevniceDataGridViewColumn":
						PutniNalogStavkaDnevnicaList[e.RowIndex].OdobreniPostotakDnevnice = (System.Decimal?)e.Value;
						break;
					case "uxIznosDataGridViewColumn":
						PutniNalogStavkaDnevnicaList[e.RowIndex].Iznos = (System.Decimal?)e.Value;
						break;
					case "uxIDKontoDnevniceDataGridViewColumn":
						PutniNalogStavkaDnevnicaList[e.RowIndex].IDKontoDnevnice = (System.Int32?)e.Value;
						break;
					case "uxIDBlagajnaStavkaDataGridViewColumn":
						PutniNalogStavkaDnevnicaList[e.RowIndex].IDBlagajnaStavka = (System.Int32?)e.Value;
						break;
				default:
				break;
			}
		}
	}
}
